﻿
using System;
using System.Collections.Generic;

namespace SW.Lite.Model.Master
{
    [Serializable]
    public class MenuModel : IModel
    {
        #region 属性

        /// <summary>
        /// 
        /// </summary>
        public int Id { get; set; }


        /// <summary>
        /// 
        /// </summary>
        public int ParentID { get; set; }


        /// <summary>
        /// 
        /// </summary>
        public string Code { get; set; }


        /// <summary>
        /// 
        /// </summary>
        public string Title { get; set; }


        /// <summary>
        /// 
        /// </summary>
        public string Icon { get; set; }


        /// <summary>
        /// 
        /// </summary>
        public string ControllerName { get; set; }


        /// <summary>
        /// 
        /// </summary>
        public string ActionName { get; set; }


        /// <summary>
        /// 
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public ICollection<MenuModel> Children { get; set; }

        #endregion
        /// <summary>
        /// 
        /// </summary>
        public MenuModel()
        {

        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="id"></param>
        /// <param name="parentID"></param>
        /// <param name="code"></param>
        /// <param name="title"></param>
        /// <param name="icon"></param>
        /// <param name="controllerName"></param>
        /// <param name="actionName"></param>
        /// <param name="sort"></param>
        public MenuModel(int id, int parentID, string code, string title, string icon, string controllerName, string actionName, int sort)
        {
            Id = id;
            ParentID = parentID;
            Code = code;
            Title = title;
            Icon = icon;
            ControllerName = controllerName;
            ActionName = actionName;
            Sort = sort;
        }
    }
}